using DaprPlus.AspNetCore.Mvc.Filters;
using Todos.Application.Users.Queries;

namespace Todos.Api.Controllers;

[ApiResultWrapperFilter]
public class UserController(IMediator mediator) : ApiControllerBase
{
    [HttpGet("node")]
    public async Task<IActionResult> GetNode(string? keyword)
    {
        var query = new GetUserNodeQuery(keyword);
        var result = await mediator.Send(query);
        return Ok(result);
    }
}